﻿using RockBus.BufferManager.Configuration;
using RockBus.BufferManager.Interfaces;

namespace RockBus.BufferManager
{
    public class BufferManagerConfiguration : IBufferManagerConfiguration
    {
        public BufferManagerConfiguration(string key)
        {
            this.Key = key;
        }

        private string Key { get; set; }

        public long MaxBufferPoolSize
        {
            get { return BufferManagerConfigurationSection.Instance.BufferManagerConfigurations[this.Key].MaxBufferPoolSize; }
        }

        public int MaxBufferSize
        {
            get { return BufferManagerConfigurationSection.Instance.BufferManagerConfigurations[this.Key].MaxBufferSize; }
        }
    }
}